/**
* Created by weiyongming on 2019-01-26
*/
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    Button,
    TouchableOpacity,
    InteractionManager
} from 'react-native';
import Palyer from '../Player/MusicPlayer';
import BaseComponet from '../BaseComponet';
import {Navigation} from 'react-native-navigation';
class My extends BaseComponet{

  static get options(){
    return{
      topBar:{
        visible:true,
        title:{
          text:'我的'
        },
      },
      bottomTabs:{
        visible: true,
      }
    }
  }

  static defaultProps = {
    data:[],
  };
  constructor(props) {
    super(props);
    this.state = {
      ...this.state,
    };
  }
  render(){
    return(
      <View style={[styles.container,{backgroundColor: this.state.backcolorStr}]}>
        <Button style={{marginTop:100,marginLeft:50}} onPress={()=>this.buttonClick()} title='播放器' color='#841584'/>
        {/*<TouchableOpacity*/}
          {/*style={{marginTop:100,marginLeft:50}} Onpress={()=>this.buttonClick()}>*/}
          {/*<Text>播放器</Text>*/}
        {/*</TouchableOpacity>*/}

      </View>
     );
  }
  buttonClick(){
    console.log('app.Palyer');
    Navigation.push(this.props.componentId, {
      component: {
        name: 'app.Palyer',
        options:{
          topBar:{
            visible:false
          }
        }
      }
    });
  }
}



const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
});

export default My;